import React from 'react';
import { Checkbox } from 'antd';

function CheckBox({ value, onChange, checkValue = 0, uncheckValue = 1 }) {
  const handleChange = (checked) => {
    onChange(checked ? checkValue : uncheckValue);
  };
  const isCheck = value === checkValue;
  return <Checkbox checked={isCheck} onChange={handleChange} />;
}
export default CheckBox;
